import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [
  { 
    path: '/login', 
    component: ()=>import('../components/login/Login.vue')
  },
  { 
    path: '/home', 
    component: ()=>import('../components/Home.vue'),
    children:[
      { 
        path: '/user',        
        component: ()=>import('../pages/user/user.vue')
      },
      { 
        path: '/sysConfig',        
        component: ()=>import('../pages/system/SystemConfig.vue')
      },
      { 
        path: '/jun',        
        component: ()=>import('../pages/system/SystemConfig.vue')
      },
      { 
        path: '/sysCodeTable',        
        component: ()=>import('../pages/system/SysCodeTable.vue')
      },
      { 
        path: '/chenhaiyun',        
        component: ()=>import('../pages/system/SysCodeTable.vue')
      }
    ]
  },
  
  {
    path: '*',
    redirect: '/home'
  }

]

const router = new VueRouter({
  routes
})

export default router
